package com.zjjk.transfer.app;

import com.zjjk.transfer.source.entity.SourcePosUser;
import com.zjjk.transfer.source.service.SourcePosUserService;
import com.zjjk.transfer.target.entity.TargetPosUser;
import com.zjjk.transfer.target.service.TargetPosUserService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;

@Component
public class PosUserTransfer extends BaseTransfer<SourcePosUser, TargetPosUser, SourcePosUserService, TargetPosUserService> {

    @Override
    protected TargetPosUser convert(SourcePosUser source) {
        TargetPosUser target = new TargetPosUser();
        BeanUtils.copyProperties(source,target);
        target.setId(Long.valueOf(source.getId()));
        target.setDeleted(0);
        return target;
    }
}
